#!/bin/bash

#! debag
# . "$HOME/.bashrc"
#!

filename="$PATH_FN/dir_AAA_/AAA_.sh"

echo -e "${HLIGHT}--- start file: $filename with args: $@ ---${NORMAL}" # start file

#e_exer "Questions? See far!" "$filename" "$LINENO"

#up_lib_git

AAA_() {

    local FNN=${FUNCNAME[0]}
    local ORIGO_DIR=$PATH_FN/dir_$FNN
    local PPWD=$PWD
    local FLN=$0
    local ARGS=($@)
    # local NARGS=$#
    # last par ${!#}
    # all param as "unied word" $*
    # all param as "summ singl words $@"

    # if [ "_man" == "$1" ]; then
    #     edit_ "$PATH_FN"/dir_"$FNN"/"$FNN".man
    #     return 0
    # fi

    # if [ "_tst" == "$1" ]; then
    #     . "$ORIGO_DIR"/"$FNN"tst/exec.tst
    #     return 0
    # fi

    # if [ "_lst" == "$1" ]; then
    #     edit_ "$PATH_FN"/dir_"$FNN"/"$FNN".lst
    #     return 0
    # fi

    # if [ "_go" == "$1" ]; then
    #     edit_ "$PATH_FN"/dir_"$FNN"/
    #     return 0
    # fi

    # if [ "-h" == "$1" ]; then
    #     echo -e "${CYAN} ${FUNCNAME[0]}() help: 
    #         MAIN: 
    #         NAME: ${FUNCNAME[0]}()
    #         ARGS:
    #         CNTL: [, -echo, -debug ...]
    #         TAGS:
    #         FLOW:
    #         DEBUG:
    #         EXAMP:${NORMAL}"
    #     return 0
    # fi

if [ "_man" == "$1" ]; then
edit_ "$PATH_FN"/dir_"$FNN"/"$FNN".man
return 0
fi
if [ "_tst" == "$1" ]; then
. "$ORIGO_DIR"/"$FNN"tst/exec.tst
return 0
fi
if [ "_lst" == "$1" ]; then
edit_ "$PATH_FN"/dir_"$FNN"/"$FNN".lst
return 0
fi
if [ "_go" == "$1" ]; then
edit_ "$PATH_FN"/dir_"$FNN"/
return 0
fi
if [ "-h" == "$1" ]; then
echo -e "${CYAN} ${FUNCNAME[0]}() help: 
MAIN: 
NAME: ${FUNCNAME[0]}()
ARGS:
CNTL: [, -echo, -debug ...]
TAGS:
FLOW:
DEBUG:
EXAMP:${NORMAL}"
return 0
fi
    #{ctrl_args_reciver}

    # echo -e "${CYAN}---$FNN() $* ---${NORMAL}" #started functions

    c_up "$ORIGO_DIR/_$FNN/_sh/" 1>/dev/null

    cd_h "$PPWD" 1>/dev/null

    #!function body===================================================================
    #!function body===============================================
    #!function body======================
    # amount_arg $# min_args max_args "in $FNN :: $*"
    # USE AAA_() -echo -deb

    # path_name="$1"

    # if [ $(is_root_01 "$1") -ne 1 ]; then
    #     path_name=$PPWD/$path_name
    # fi

    echo_AAA_=0
    debug_AAA_=0
    garg_ ${FUNCNAME[0]} $@ 1>/dev/null
    echo_deb_ ${echo_AAA_} "cntl echo_deb_ mode in ${FNN}"
    if [ ${debug_AAA_} -eq 1 ]; then
        echo "DEBUG MODE in ${FNN}"
    fi

    # altlinux_AAA_() {
    #     :
    # }

    # fedora_AAA_() {
    #     :
    # }

    # if [ $PLT_COGOS == "altlinux" ]; then
    #     altlinux_AAA_
    # fi

    # if [ $PLT_COGOS == "fedora" ]; then
    #     fedora_AAA_
    # fi

    #!function body======================
    #!function body===============================================
    #!function body===================================================================

    cd "$PPWD"

}

# AAA_ @

unset filename
